<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style type="text/css">
        *
        {
            margin: 0;
            padding: 0;
        }
        /*设置表的容器的格式*/
        .clock
        {
            width: 500px;
            height: 500px;
            margin: 0 auto;
            margin-top: 100px;
            border-radius: 50%;
            border: 10px solid black;
            position: relative;
            background-image: url("../TestPicture/clock.jpg");
            background-size: cover;
        }

        /*共同代码-元素居中*/
        .clock > div
        {
            position: absolute;
            top: 0;
            left: 0;
            bottom: 0;
            right: 0;
            margin: auto;
        }

        /*设置时针的容器*/
        .hour-wrapper
        {
            height: 70%;
            width: 70%;
            animation: run 7200s linear infinite;
        }
        /*设置时针*/
        .hour
        {
            height: 50%;
            width: 6px;
            background-color: black;
            margin: 0 auto;
            animation: roll 7200s liner infinite ;
        }

        /*设置分针的容器*/
        .min-wrapper
        {
            height: 80%;
            width: 80%;
            animation: roll 600s linear infinite;
        }
        /*设置分针*/
        .min
        {
            height: 50%;
            width: 5px;
            background-color: black;
            margin: 0 auto;
        }

        /*设置秒针的容器*/
        .sec-wrapper
        {
            height: 95%;
            width: 95%;
            animation: roll 10s steps(60) infinite;
        }
        .sec
        {
            height: 50%;
            width: 4px;
            background-color: red;
            margin: 0 auto;
        }
        /*旋转的关键帧*/
        @keyframes roll
        {
            from
            {
                transform: rotateZ(0);
            }
            to
            {
                transform: rotateZ(360deg);
            }
        }
    </style>
</head>
<body>
    <!--创建表的容器-->
    <div class="clock">
        <!--创建时针-->
        <div class="hour-wrapper">
            <div class="hour"></div>
        </div>
        <!--创建分针-->
        <div class="min-wrapper">
            <div class="min"></div>
        </div>
        <!--创建秒针-->
        <div class="sec-wrapper">
            <div class="sec"></div>
        </div>
    </div>
</body>
</html>